/**
 * 
 */
package com.swim.webuser.service;

import java.util.List;

import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.swim.natatoriuminfotouser.entity.NatatoriumInfoToUser;
import com.swim.natatoriuminfotouser.service.NatatoriumInfoToUserService;

/**
 * 结算记录Service
 * @author 刘军武
 * @version 2021-03-05
 */
@Service
@Transactional(readOnly=true)
public class WebUserService {
	
	@Autowired
	private NatatoriumInfoToUserService natatoriumInfoToUserService;
	
    public String getNatatoriumInfoIdByUserCode(String userCode) {
		NatatoriumInfoToUser natatoriumInfoToUser = new NatatoriumInfoToUser();
        natatoriumInfoToUser.setUserCode(userCode);
        List<NatatoriumInfoToUser> natatoriumInfoToUserList = natatoriumInfoToUserService.findList(natatoriumInfoToUser);
        String natatoriumInfoId = "";
        if (!CollectionUtils.isEmpty(natatoriumInfoToUserList)) {
            natatoriumInfoId = natatoriumInfoToUserList.get(0).getNatatoriumInfoId();
        }
		return natatoriumInfoId;
	}
	
}